#include <iostream>
using namespace std;

bool judge(int k,int m);
int main()
{
	int n;
	while(cin>>n){
		if(judge(n,n*n)) cout<<"Yes!"<<endl;
		else cout<<"No!"<<endl; 
	}
	
}

bool judge(int k,int m)
{
	int k_, m_;
	bool flag=true;
	while(k>0){
		k_=k%10;
		k=k/10;
		m_=m%10;
		m=m/10;
		if(k_!=m_) {
			flag=false;
			break;
		}
	}
	return flag;
}
